package com.ihg.hiex.entity.session.before.finaltest;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

import com.ihg.hiex.entity.session.during.SessionExerciseAnchor;

/**
 * 题目模板
 * 
 * @author mohanlan
 *
 */
@Entity
@Table(name = "final_test_score_template")
public class FinalTestScoreTemplate {
    
    @Id
    @GeneratedValue
    private Long id;
    
    /** 对应大题模板 */
    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    private FinalTestExerciseTemplate exerciseTemplate;
    
    /** 打分描述 */
    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    private SessionExerciseAnchor anchor;
    
    /** 标准答案 */
    private String answer;
    
    /** 标准答案理由说明 */
    @Type(type = "text")
    private String reason;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    /**
     * The default constructor
     */
    public FinalTestScoreTemplate() {
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the exerciseTemplate
     */
    public FinalTestExerciseTemplate getExerciseTemplate() {
        return exerciseTemplate;
    }

    /**
     * @return the anchor
     */
    public SessionExerciseAnchor getAnchor() {
        return anchor;
    }

    /**
     * @return the answer
     */
    public String getAnswer() {
        return answer;
    }

    /**
     * @return the reason
     */
    public String getReason() {
        return reason;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param exerciseTemplate the exerciseTemplate to set
     */
    public void setExerciseTemplate(FinalTestExerciseTemplate exerciseTemplate) {
        this.exerciseTemplate = exerciseTemplate;
    }

    /**
     * @param anchor the anchor to set
     */
    public void setAnchor(SessionExerciseAnchor anchor) {
        this.anchor = anchor;
    }

    /**
     * @param answer the answer to set
     */
    public void setAnswer(String answer) {
        this.answer = answer;
    }

    /**
     * @param reason the reason to set
     */
    public void setReason(String reason) {
        this.reason = reason;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }
    
}
